upr <- readRDS("upr_data.rds")
load("AgreementScores.Rdata")
controls <- read.csv("controls.csv")
trade <- readRDS("trade.rds")
dfAgree <- dfAgree[,c("ccode1","ccode2","year","IdealPointDistance")]
names(dfAgree) <- c("rs_ccode","sur_ccode","year","un_agreement")
upr <- merge(upr,dfAgree,by=c("rs_ccode","sur_ccode","year"),all.x=TRUE)
### Trade
trade$ccode_sender <- countrycode(trade$country1_iso,"iso3c","cown",custom_match=c('SRB'=345))
